package cn.dida.core;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * 数据源路由，实现数据源的动态切换
 * 
 * @author weiwei
 */
public class RoutingDataSource extends AbstractRoutingDataSource {
    
    @Override
    protected Object determineCurrentLookupKey() {
        return DatasourceHolder.getDatasourceKey();
    }
    
}
